From: Keir Fraser Date: Tue, 18 May 2010 12:30:45 +0000 (+0100) Subject: x86-hpet: fix booting NULL pointer panic introduced by c/s 21398. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12131 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=ca3ab005c14186c4b319a0995f25a0cab1092835;p=xen.git x86-hpet: fix booting NULL pointer panic introduced by c/s 21398. (XEN) Xen call trace: (XEN) [] check_lock+0x19/0x49 (XEN) [] _spin_lock_irq+0x28/0x4a (XEN) [] hpet_broadcast_exit+0x92/0x1f0 (XEN) [] acpi_processor_idle+0x62c/0x6e6 (XEN) [] idle_loop+0x62/0x73 Signed-off-by: Wei Gang --- diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 556368632a..e67e5ce5d3 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -684,6 +684,9 @@ void hpet_broadcast_exit(void) if ( this_cpu(timer_deadline_start) == 0 ) return; + if ( !ch ) + ch = hpet_get_channel(cpu); + /* Reprogram the deadline; trigger timer work now if it has passed. */ enable_APIC_timer(); if ( !reprogram_timer(this_cpu(timer_deadline_start)) )